import bus from '@/bus'
import { renderButton } from '@/util';
let data = {
	status: 'pass',
	totalItem: 1,
	pageSize: window.$pageSize,
	currentPage: 1,
  form: {
    number: '', // 款式编号
    sex: '', // 性别
    decade: '', // 年份
    season: '', // 季节
    category: '', // 品类
    style: '', // 款式属性
    te_code_arr: '', // 特征码
  },
  options: {
    sexList: [{
      label: '男',
      value: 1
    }, {
      label: '女',
      value: 2
    }, {
      label: '儿童',
      value: 3
    }],
    season: []
  },
	columns: [{
		title: '订单编号',
		key: 'store_no',
		align: 'left',
    minWidth: 200
	}, {
		title: '编码（款号）',
		key: 'number',
		align: 'left',
    minWidth: 150
	}, {
		title: '性别',
		key: 'sex_name',
		align: 'left',
    minWidth: 80
	}, {
		title: '年份',
		key: 'decade',
		align: 'left',
    minWidth: 200
	}, {
		title: '品类',
		key: 'category',
		align: 'left',
    minWidth: 200
	}, {
		title: '季节',
		key: 'season',
		align: 'left',
    minWidth: 150
	}, {
		title: '款式属性',
		align: 'left',
		key: 'style',
    minWidth: 150,
		// render: (h, params) => {
		// 	let state = ''
		// 	if (params.row.isEnabled) {
		// 		state = '启用'
		// 	} else {
		// 		state = '禁用'
		// 	}
		// 	return h('div', state)
		// }
	}, {
		title: '制版师',
		key: 'zb_name',
		align: 'left',
    minWidth: 200
	}, {
		title: '日期',
		key: 'creation_time',
		align: 'left',
    minWidth: 200
  }, {
		title: '特征码',
		key: 'te_name',
		align: 'left',
    minWidth: 200
  }, {
		title: '操作',
		align: 'right',
    fixed: 'right',
		minWidth: 280,
		render: (h, params) => {
      let list = []
      for(let key in params.row.icon){
        if (params.row.icon[key].is_show == 1) list.push(renderButton(h, { text: params.row.icon[key].name, type: 'primary'},()=>{ bus.$emit("onEdit", { type: key , row: params.row})}))
      }
      return (
        <div>
          { list }
        </div>
      )
		}
	}],
	data: []
}
export default data